                    <div id="register_block">
                        <div id="block_head_blank" class="register_block_head scroll_to">
                            <?php echo $block_title; ?>
                        </div>
                        
                        <div id="register_block_body">
			    <div id="build_website">
				<form action="<?php echo base_url(); ?>user/website/save" method="post" accept-charset="utf-8" class="" id="build_website_frm" enctype="multipart/form-data">
				    <div id="build_website_frm_">
					<input type="hidden" name="id" value="<?php echo $website_info['id']; ?>" />
					<input type="hidden" name="company_id" value="<?php echo $website_info['company_id']; ?>" />
					<div class="build_website_frm">
					    <span for="title">Title เว็บไซต์ : </span>
					    <input type="text" name="title" id="title" class="input_text_search" value="<?php echo $website_info['title']; ?>" />
					</div>
					<div class="build_website_frm">
					    <span for="description">คำอธิบายสั้นๆ : </span>
					    <textarea name="description" id="description" class="mceNoEditor"><?php echo $website_info['description']; ?></textarea>
					</div>
					<div class="build_website_frm" style="display:none;">
					    <span for="body_bg_color">สีพื้นหลัง : </span>
					    <input type="text" name="body_bg_color" id="body_bg_color" class="input_text_search" value="<?php echo $website_info['body_bg_color']; ?>" />
					</div>
					<div class="build_website_frm">
					    <span for="img">รูป : </span>
					    <input type="file" name="img" id="img"  /> <p class="form_guide"><?php echo $this->lang->line('web_image_dimension'); ?></p>
					</div>
					<?php if($website_info['created']){ ?>
					<div class="build_website_frm">
					    <span>&nbsp;</span>
					    <img src="<?php echo site_url(),'assets/image/website/',$website_info['id'],'/',$website_info['img']; ?>" style="width:500px;" />
					    <input type="hidden" name="old_img" value="<?php echo $website_info['img']; ?>" />
					</div>
					<?php } ?>
					<div class="build_website_frm" style="width:500px;">
					    <span for="detail">รายละเอียด  : </span>
					    <textarea name="detail" id="detail"><?php echo $website_info['detail']; ?></textarea>
					    <div class="clear"></div>
					</div>
					<div class="build_website_frm">
					    <span for="status">เปิดใช้งาน : </span>
					    <input name="status" <?php echo $website_info['status_0']; ?> value="0" type="radio"> ไม่
					    <input name="status" <?php echo $website_info['status_1']; ?> value="1" type="radio"> ใช่
					</div>
				    </div>		
				    
				    <div class="build_website_frm">
					<span for="logoimg">&nbsp;</span>
					<input type="submit" name="mysubmit"  id="mysubmit" value="บันทึกข้อมูล" />
					<?php if($website_info['created']){ ?>
					<a href="<?php echo base_url(); ?>site/<?php echo $website_info['id']; ?>/<?php echo urlencode($website_info['title']); ?>" target="_blank" title="เรียกดู">เรียกดู</a>
					<?php } ?>
				    </div>
				</form>	    
			    </div>
                        </div>
                        
                        <div id="register_block_footer">
                            
                        </div>
                    </div>
		    <script type="text/javascript" src="<?php echo js_asset_url('jquery.validate.min.js'); ?>"></script>
		    <!-- tinyMCE -->
		    <script language="javascript" type="text/javascript" src="<?=js_asset_url('tinymce/jscripts/tiny_mce/tiny_mce.js', 'admin')?>"></script>
		    <script type="text/javascript">
			$(document).ready(function(){
			    $("#register_step2_form").validate({
				rules: {
				    username: {
					required: true,
					rangelength:[5,32],
					remote: '<?php echo site_url(); ?>user/user_existed'
				    },
				    firstname: "required",
				    lastname: "required",
				    email: {
					required: true,
					email: true,
					remote: '<?php echo site_url(); ?>user/email_existed'
				    },
				    password: {
					    required: true,
					    rangelength:[5,15]
				    },
				    conf_password: {
					    equalTo: "#password"
				    },
				    company_category: {
					    min: 1
				    },
				    company_province: {
					    min: 1
				    },
				    company_name: "required",
				    company_postcode: "required"
				},
				messages: {
				    username: {
					required: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกชื่อผู้ใช้</em>",
					rangelength: "&nbsp;&nbsp;&nbsp;&nbsp;<em>ชื่อผู้ใช้ต้องมีความยาว 5 - 32 ตัวอักษร</em>",
					remote: "&nbsp;&nbsp;&nbsp;&nbsp;<em>ชื่อผู้ใช้นี้ถูกใช้ไปแล้ว</em>"
				    },
				    firstname: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกชื่อ</em>",
				    lastname: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกนามสกุล</em>",
				    email: {
					required: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกอีเมล์</em>",
					email: "&nbsp;&nbsp;&nbsp;&nbsp;<em>อีเมล์ไม่ถูกต้อง</em>",
					remote: "&nbsp;&nbsp;&nbsp;&nbsp;<em>อีเมล์นี้ถูกใช้ไปแล้ว</em>"
				    },
				    password: {
					    required: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกรหัสผ่าน</em>",
					    rangelength: "&nbsp;&nbsp;&nbsp;&nbsp;<em>รหัสผ่านต้องมีความยาว 5 - 15 ตัวอักษร</em>"
				    },
				    conf_password: {
					    equalTo: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณายืนยันรหัสผ่าน</em>"
				    },
				    company_category: {
					    min: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณาเลือกหมวดหมู่ของบริษัท</em>"
				    },
				    company_province: {
					    min: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณาเลือกจังหวัดที่ตั้ง</em>"
				    },
				    company_name: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกชื่อบริษัท</em>",
				    company_postcode: "&nbsp;&nbsp;&nbsp;&nbsp;<em>กรุณากรอกรหัสไปรษณีย์</em>"
				}
			    });
			    
			    $('#mysubmit').click(function(){
				if($("#register_step2_form").valid()){
				   $("#register_step2_form").submit();
				}
			    });
			    
			    $('#company_category').live('change',function(){
				var parentID = ($(this).val());
				if(parentID==0){
				    $('#sub_cat_select').css('display','none');
				}else{
				    $.get('<?php echo site_url(); ?>home/getSubOption/'+parentID,'',function(data){
					$('#company_subcat').html(data);
					$('#sub_cat_select').css('display','block');
				    });
				}
			    });
			});
			
			tinyMCE.init({
			    // General options
			    mode : "specific_textareas",
			    theme : "advanced",
			    editor_deselector : "mceNoEditor",
			    //width : '500',
			    plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
			  
			    // Theme options
			    //theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,|,sub,sup,|,formatselect,fontselect,fontsizeselect",
			    //theme_advanced_buttons2 : "tablecontrols,hr,|,undo,redo|,link,unlink,image,media,|,forecolor,backcolor,|,preview,code,fullscreen",
			    //theme_advanced_buttons3 : "",
			    theme_advanced_toolbar_location : "top",
			    theme_advanced_toolbar_align : "left",
			    theme_advanced_statusbar_location : "bottom",
			    theme_advanced_resizing : true,
			    //content_css : "<?php echo base_url(),'assets/modules/admin/css/'; ?>/tinyMCE.css",
			  
			    // Drop lists for link/image/media/template dialogs
			    template_external_list_url : "lists/template_list.js",
			    external_link_list_url : "lists/link_list.js",
			    external_image_list_url : "lists/image_list.js",
			    media_external_list_url : "lists/media_list.js",
			    relative_urls : false,
			  
			      template_replace_values : { 
				      username : "Some User", 
				      staffid : "991234" 
			      }
			  });
		    </script>